home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15583 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: news.iadfw.net!usenet
  2. From: Mark Nelson <markn@airmail.net>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Copy Binary files to printer
  5. Date: Fri, 19 Apr 1996 21:35:02 -0500
  6. Organization: customer of Internet America
  7. Message-ID: <31784D56.7E2@airmail.net>
  8. References: <4l6s6u$3cg@news.accent.net>
  9. NNTP-Posting-Host: dal03-09.ppp.iadfw.net
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0GoldB2 (Win95; I)
  14.  
  15. Simon Girouard wrote:
  16. > Hi there!
  17. > I am writing a C program that simulate the DOS "COPY /B" command but send
  18. > the file to a printer on a parallel port.
  19.  
  20. > The problem is that when writing to a file, it works fine but
  21. > when writing to the parrallele port "LPT1" it seems to have trouble
  22. > with the handshake and some garbage gets printed.
  23. > Is there a way to fix this !
  24. > Simon G.
  25.  
  26. You might try executing the following command from the command line:
  27.  
  28. MODE LPT1:,,p
  29.  
  30. Normally, when the BIOS times out while writing to a printer, MS-DOS just
  31. throws away whatever stuff it was sending, and moves on.  If you set the
  32. "p" parameter as shown above, it will keep retrying forever.  This is 
  33. normally what you want.
  34.  
  35.  
  36. Mark Nelson
  37. http://web2.airmail.net/markn
  38.